package tomsung.cloud.agdc.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tomsung.cloud.agdc.bean.OperateLog;
import tomsung.cloud.agdc.dao.OperateLogMapper;

@Service("OperateLogService")
public class OperateLogService {

	@Autowired
	OperateLogMapper operateMapper;
	
	public int createOperateLog(OperateLog record)
	{
		return operateMapper.insertSelective(record);
	}
	
	public int deleteOperateLog(Integer groupid)
	{
		return operateMapper.deleteByPrimaryKey(groupid);
	}
	
	public OperateLog selectOperateLog(Integer groupid)
	{
		return operateMapper.selectByPrimaryKey(groupid);
	}
	
	public int updateOperateLog(OperateLog record)
	{
		return operateMapper.updateByPrimaryKey(record);
	}
	
	public List<OperateLog> selectOperateLog(String userName, int pageIndex, int pageStep)
	{
		return operateMapper.selectOperateLog(userName, pageIndex, pageStep);
	}
	
	public int selectOperateLogCount(String userName)
	{
		return operateMapper.selectOperateLogCount(userName);
	}
}
